<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/pages/common/header.jsp"%>
<jdf:themeFile file="jquery.jqGrid.css"/>
<jdf:themeFile file="jqGrid/i18n/grid.locale-cn.js" />
<jdf:themeFile file="jqGrid/jquery.jqGrid.src.js" />
<jdf:themeFile file="business/expenseApply.js" />
</head>
<body>
	<div class="contentBody contentborder">
		<div class="tab-pane" id="tabPane">
			<div id="message">${message}</div>
			<div class="tab-page" id="tabPage1">
				<h1 class="tab">费用申请</h1>
				<div class="contentborder tableForm">
					<jdf:form bean="entity" scope="request">
						<form action="${dynamicDomain}/expenseApply/save?action=${param.action}" method="post" id="Order">
							<input type="hidden" name="id">
							<input type="hidden" name="objectId">
							<input type="hidden" name="status" id="status">
							<input type="hidden" name="generateDate">
							<input type="hidden" name="applyUserId">
                            <input type="hidden" name="approvalUserId">
                            <input type="hidden" name="backwardReason">
							<table class="inputTable">
								<tr>
								    <td class="label cancelBorderLeft" width="20%">
                                        <label for="predictPayDate">预计支付日期：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <input type="text" name="predictPayDate" size="12" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})">
                                    </td>
								</tr>
								<tr>
                                    <td class="label cancelBorderLeft" style="width: 250px;">
                                        <label for="companyId">公司：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <input type="hidden" name="companyId" id="companyId" validate="true">
                                        <input type="text" id="companyName" value="${entity.company.name}" size="70" readonly="readonly"/>
                                        <a href="${dynamicDomain}/company/select?ajax=1&keepThis=true&TB_iframe=true&height=460&width=700" class="colorbox">选择公司</a>
                                    </td>
                                </tr>
								<c:if test="${param.action=='page'}">
								<tr>
								    <td class="label cancelBorderLeft">
                                        <label for="payDate">支付日期：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <input type="text" name="payDate" size="12" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})">
                                    </td>
								</tr>
								<tr>
								    <td class="label cancelBorderLeft">
                                        <label for="backup">支付凭证备份：</label>
                                    </td>
                                    <td class="content">
                                        <input type="radio" name="backup" value="true" id="backup_1"/><label for="backup_1">是</label>
                                        <input type="radio" name="backup" value="false" id="backup_2"/><label for="backup_2">否</label>
                                    </td>
                                    <td class="label">
                                        <label for="backup">备份日期：</label>
                                    </td>
                                    <td class="content">
                                        <input type="text" name="backupDate" size="12" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})">
                                    </td>
                                </tr>
                                </c:if>
                                <tr>
                                    <td class="label cancelBorderLeft" width="20%">
                                        <label for="remark">备注：</label>
                                    </td>
                                    <td class="content" colspan="3">
                                        <textarea rows="2" cols="30" name="remark"></textarea>
                                    </td>
                                </tr>
							</table>
						</form>
					</jdf:form>
					<div style="margin: 1px;">
                        <table id="orderItemsTable"></table>
                        <div id="pager"></div>
                    </div>
					<div class="right" style="margin: 2px;">
					   <c:if test="${view!=1 && (empty entity.status || entity.status == 1)}">
                            <button type="button" onclick="$('#status').val(1);$('#Order').submit();" class="submit_button">保存草稿</button>
                        </c:if>
                        <c:if test="${(view!=1 && (entity.status <10))||param.action=='page'}">
                            <button type="button" onclick="$('#status').val(5);$('#Order').submit();" class="submit_button">提交</button>
                        </c:if>
						<c:if test="${not empty message}">
						<button type="button" onclick="toUrl('${dynamicDomain}/expenseApply/create?action=${param.action}')">继续增加</button>
						</c:if>
						<c:choose>
							<c:when test="${param.action=='page'}">
								<button type="button" onclick="toUrl('${dynamicDomain}/expenseApply/back')">返回</button>
							</c:when>
							<c:otherwise>
								<button type="button" onclick="toUrl('${dynamicDomain}/expenseApply/${param.action}')">返回</button>
							</c:otherwise>
						</c:choose>
					</div>
				</div>
			</div>
		</div>
	</div>
	<jdf:tableLabelValidate domain="ExpenseApply"/>
	<script type="text/javascript">
	var expenseApplyId = "${entity.objectId}";

	</script>
	
</body>
</html>